package com.yuelife.user.controller;

import com.yuelife.user.entity.Village;
import com.yuelife.user.service.VillageService;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

/**
 * (Village)表控制层
 *
 * @author makejava
 * @since 2020-06-28 13:55:36
 */
@RestController
@RequestMapping("village")
public class VillageController {
    /**
     * 服务对象
     */
    @Resource
    private VillageService villageService;

    /**
     * 通过主键查询单条数据
     *
     * @param id 主键
     * @return 单条数据
     */
    @GetMapping("selectOne")
    public Village selectOne(Integer id) {
        return this.villageService.queryById(id);
    }

}